package com.atguigu.yygh.cmn.feignclient;

import com.atguigu.yygh.common.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;


@FeignClient(value = "service-cmn")
//@RequestMapping("/admin/cmn/dict")
//@Component
public interface DictFeignClient {

    // 根据value查询
    @ApiOperation("据value查询")
    @GetMapping("/admin/cmn/dict/getName/{value}")
     String getName(@PathVariable("value") String value);

    // 根据dictCode和value查询 | 提供两个api接口，如省市区不需要上级编码，医院等级需要上级编码
    @ApiOperation("据dictCode和value查询")
    @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
    String getName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);



}
